<?php

class dbaBerrubriken{

 function dbaBerrubriken (&$dba) {
   $this->dba = &$dba;
 }

 function addRubrik ($name,$status) {
   return $this->dba->query("insert into ".$this->dba->tableforwarder."_berrubriken (name,status) values ('$name','$status');");
 }

 function updateRubrik ($id,$name,$status) {
   return $this->dba->query("update ".$this->dba->tableforwarder."_berrubriken set name='$name',status='$status' where id=$id;");
 }

 function updateStatus ($id,$status) {
   return $this->dba->query("update ".$this->dba->tableforwarder."_berrubriken set status='$status' where id=$id;");
 }

 function delRubrik ($id) {
   return $this->dba->query("delete from ".$this->dba->tableforwarder."_berrubriken where id=$id;");
 }

 function getRubrik ($id) {
   $this->dba->query("select * from ".$this->dba->tableforwarder."_berrubriken where id=$id;");
   return $this->dba->fetch_row_array();
 }

 function getRubriken () {
   $this->dba->query("select * from ".$this->dba->tableforwarder."_berrubriken;");
   return $this->dba->fetch_rows_array();
 }

 function getPubRubriken () {
   $this->dba->query("select * from ".$this->dba->tableforwarder."_berrubriken where status='p';");
   return $this->dba->fetch_rows_array();
 }

}
?>